﻿#pragma once


// GlobalVariables

class GlobalVariables : public CWnd
{
	DECLARE_DYNAMIC(GlobalVariables)

public:
	GlobalVariables();
	virtual ~GlobalVariables();

protected:
	DECLARE_MESSAGE_MAP()
};

struct AddressPLC
{
	int TotalCount;  //单卷切片总数
	int	NGCount;     //切片NG数
	int	OKCount;     //切片OK数
	int	MaterialNum;  //负极料卷信息
	int	FilmWidth;    //极片宽度
	int	CreateTime;   //创建时间
	int	CutterNum;    //刀模编号
	int	CutterFrequency;   //切刀次数
	int	Tension;     //放卷张力
	int Box1;      //负极弹夹信息
	int Box2;    //料盒2
	int RollChange; //换卷标志
	int ClipChange;//换弹夹标志
	int Alarm;//报警地址
	int Heart;
	int ProductType;
};
struct SendMes
{
	int	dOKCount;     //切片OK数
	CString	cstrMaterialNum;  //负极料卷信息
	float	dFilmWidth;    //极片宽度
	CString	cstrCreateTime;   //创建时间
	CString	cstrCutterNum;    //刀模编号
	int	dCutterFrequency;   //切刀次数
	float	dTension;     //放卷张力
	CString cstrBox1;      //负极弹夹信息	
};
struct InfoMES
{
	CString IP;
	int Port;
	CString FactoryCode;  //工厂编号
	CString EquipmentCode;  //设备编号
	CString UserName;  //登录张号
	CString UserPassWord;  //登录张号
	CString TestCode;  //试验单号
	CString ProductIden; //产品条码
	CString DanJiaCode; //弹夹信息
	int ProductType;  //产品类型
	
	CString cstrProductType;
};

struct Land
{
	CString Use1;
	CString PassWord1;
	CString Use2;
	CString PassWord2;
	CString Use3;
	CString PassWord3;
	int PassLevel;
};
extern CString g_FilePathPLC;
extern CString g_FilePathLog;
extern CString g_SystemPathPLC;
extern CString g_MESPathLog;
extern AddressPLC g_PLCAddress;
extern DHInterface* g_pPlc;//Plc通信模块
extern InfoMES g_InfoMes;  //MES信息
extern Land g_Land; //账号密码信息
extern int MESStatus; //账MES状态
extern SendMes g_SendMes;  //发送数据
extern PVOID     g_pMainDialog;       //主对话框;
extern int SendType; //发送类型
extern int PassType; //MES登录
extern int g_ProductCod; //产品条码自动读取
extern int g_DanJiaCode; //弹夹条码自动读取
extern CString g_cstrFrontBatch;
extern DHInterface* g_pWatch;//异常模块